﻿<local:DocumentBase x:Class="WPFExcelReport.HWDVV06"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                xmlns:fd="clr-namespace:Labs.Filtering;assembly=ReflectionStudio.Core"
              xmlns:local="clr-namespace:ReflectionStudio.Components.UserControls;assembly=ReflectionStudio.Core"
        Title="DeliveryNote" Height="700" Width="1024" 
        xmlns:my="clr-namespace:WPFExcelReport" 
      Loaded="Window_Loaded">
    <local:DocumentBase.Resources>
    </local:DocumentBase.Resources>
    <Grid DataContext="{Binding}">
        <Grid.RowDefinitions>
            <RowDefinition Height="86" />
            <RowDefinition Height="224*" />
            <RowDefinition Height="280*" />
            <RowDefinition Height="70*" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="303*"></ColumnDefinition>
            <ColumnDefinition Width="10*" />
            <ColumnDefinition Width="2*" />
            <ColumnDefinition Width="186*" />
            <ColumnDefinition Width="501*"></ColumnDefinition>
        </Grid.ColumnDefinitions>
        <StackPanel Grid.ColumnSpan="5" Orientation="Horizontal">
            <Button Content="生成报表" Height="40" Margin="60,10,0,0"  Name="btnQuery" Width="90" Click="btnQuery_Click"/>
            <TextBlock FontSize="18"  Height="26"   Width="93" Name="txt1" Margin="30,10,0,0" Text="任务书编号" />
            <TextBlock  FontSize="18" Height="43"    Width="195" Name="txtVKPAUFLFD"   Margin="30,10,0,0"    Text="" />
            <TextBlock FontSize="18" Height="24"  Width="60"  Name="txt2" Text="发货单" Margin="30,10,0,0" />
            <TextBlock FontSize="18" Height="41" Width="159" Name="txtVVLIEFSCH" Margin="30,10,0,0" Text=""  />
            <TextBlock FontSize="18" Height="24"  Width="41"  Name="txt3" Text="颜色" Margin="30,10,0,0" />
            <TextBlock FontSize="18" Height="41" Width="120" Name="txtCOLOR" Margin="30,10,0,0" Text=""  />
        </StackPanel>
        <fd:FilteringDataGrid CanUserReorderColumns="True"  
          CanUserResizeRows="True" CanUserSortColumns="True"
            IsFilteringCaseSensitive="False"
            AutoGenerateColumns="False"   
                  EnableRowVirtualization="True"  
                  RowDetailsVisibilityMode="VisibleWhenSelected" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
                                IsSynchronizedWithCurrentItem="True" Opacity="10" Visibility="Visible"
                               ItemsSource="{Binding Path=SALESORDER}" 
                               Margin="0,74,0,100" 
                               x:Name="VKPOSDataGrid" 
                               SelectionChanged="MainDataGrid_SelectionChanged" Grid.ColumnSpan="5" Grid.RowSpan="2">
            <fd:FilteringDataGrid.Columns>
                <DataGridTextColumn Header="客户"   Binding="{Binding KDKUNDNA}"/>
                <DataGridTextColumn Header="任务"     Binding="{Binding VKPAUFKRS}"/>
                <DataGridTextColumn Header="书编号"     Binding="{Binding VKPAUFLFD}"/>
                <DataGridTextColumn Header="客户PO"   Binding="{Binding VKPKDKOMM}"/>
                <DataGridTextColumn Header="规格"   Binding="{Binding STR}"/>
                <DataGridTextColumn Header="品种"   Binding="{Binding VKPART}"/>
                <DataGridTextColumn Header="颜色"   Binding="{Binding VKPFARBE}"/>
                <DataGridTextColumn Header="数量"   Binding="{Binding VKPMENGE1}"/>
                <DataGridTextColumn Header="单位"   Binding="{Binding VKPMEEH}"/>
                <DataGridTextColumn Header="备注" Binding="{Binding VKPZUSATZ}"/>
            </fd:FilteringDataGrid.Columns>
        </fd:FilteringDataGrid  >
        <fd:FilteringDataGrid  Grid.Row="1" CanUserReorderColumns="True"  
          CanUserResizeRows="True" CanUserSortColumns="True"
            IsFilteringCaseSensitive="False"
            AutoGenerateColumns="False"   
                  EnableRowVirtualization="True"  
                  RowDetailsVisibilityMode="VisibleWhenSelected" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
                               ItemsSource="{Binding Path=VVTLIEF}" 
                               Margin="0,124,0,266" 
                               x:Name="listVVTLIEF" 
                             SelectionChanged="listVVTLIEF_SelectionChanged" 
                             IsSynchronizedWithCurrentItem="False" Opacity="10" Visibility="Visible" Grid.RowSpan="2" Grid.ColumnSpan="5" DataContext="{Binding}">
            <fd:FilteringDataGrid.Columns>
                <DataGridTextColumn Header="发货单"  Width="80"  Binding="{Binding VVTLIEFSCH}"/>
                <DataGridTextColumn Header="发货单状态"   Binding="{Binding STATUS}"/>
                <DataGridTextColumn Header="运输方式"   Binding="{Binding VVVERSART}"/>
                <DataGridTextColumn Header="承运人"   Binding="{Binding VVSPED}"/>
                <DataGridTextColumn Header="数量（码）"   Binding="{Binding QUANTITY}"/>
                <DataGridTextColumn Header="重量（KG)"   Binding="{Binding KG}"/>
                <DataGridTextColumn Header="发货日期"   Binding="{Binding VVVERSDAT}"/>
                <DataGridTextColumn Header="发货建议号"   Binding="{Binding VVAVISNR}"/>
                <DataGridTextColumn Header="发票号"   Binding="{Binding VVTRENR}"/>
            </fd:FilteringDataGrid.Columns>
        </fd:FilteringDataGrid  >
        <fd:FilteringDataGrid  Grid.Row="2" IsFilteringCaseSensitive="False"
            AutoGenerateColumns="False" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
                               ItemsSource="{Binding Path=WBBST}" 
                               Margin="6,15,1,-5" 
                               x:Name="listWBBST" Grid.ColumnSpan="2" Grid.RowSpan="2" Grid.Column="3">
            <fd:FilteringDataGrid.Columns>
                <DataGridTextColumn Header="序号"   Binding="{Binding CODE}"/>
                <DataGridTextColumn Header="任务书编号"   Binding="{Binding LOT}"/>
                <DataGridTextColumn Header="编号"   Binding="{Binding WBBBEM}"/>
                <DataGridTextColumn Header="板号"   Binding="{Binding CARD}"/>
                <DataGridTextColumn Header="布卷号"   Binding="{Binding PIECENO}"/>
                <DataGridTextColumn Header="品种"   Binding="{Binding ARTICLE}"/>
                <DataGridTextColumn Header="颜色"   Binding="{Binding WBBTAX}"/>
                <DataGridTextColumn Header="数量（码）"   Binding="{Binding ACTYAND}"/>
                <DataGridTextColumn Header="重量（KG)"   Binding="{Binding ACTWEI}"/>
                <DataGridTextColumn Header="质量等级"   Binding="{Binding QUALITY}"/>
            </fd:FilteringDataGrid.Columns>
        </fd:FilteringDataGrid  >
        <fd:FilteringDataGrid  Grid.Row="2" CanUserReorderColumns="True"  
          CanUserResizeRows="True" CanUserSortColumns="True"
            IsFilteringCaseSensitive="False"
            AutoGenerateColumns="False"   
                  EnableRowVirtualization="True"  
                  RowDetailsVisibilityMode="VisibleWhenSelected" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
                               ItemsSource="{Binding Path=COLOR}" 
                               Margin="0,15,180,-6" 
                               x:Name="listCOLOR" 
                             SelectionChanged="listCOLOR_SelectionChanged" 
                             IsSynchronizedWithCurrentItem="False" Opacity="10" Visibility="Visible" DataContext="{Binding}" Grid.ColumnSpan="4" Grid.RowSpan="2">
            <fd:FilteringDataGrid.Columns>
                <DataGridTextColumn Binding="{Binding COLOR}" Header="颜色" Width="80" />
                <DataGridTextColumn Binding="{Binding DES}" Header="颜色描述" />
            </fd:FilteringDataGrid.Columns>
        </fd:FilteringDataGrid>
    </Grid>
</local:DocumentBase>
